cbuffer vertexShaderConstantBuffer
{
	matrix worldMatrix;
	matrix worldInverseTransposeMatrix;
	matrix viewMatrix;
	matrix projectionMatrix;
	matrix textureTransformMatrix;
};

struct VertexInput
{
	float3 position : POSITION;
	float3 normalLocal : NORMAL;
	float2 textureCoordinate : TEXCOORD;
};

struct VertexOutput
{
	float4 positionHomogeneous : SV_POSITION;
	float3 positionWorld : POSITION;
	float3 normalWorld : NORMAL;
	float2 textureCoordinate : TEXCOORD;
};

VertexOutput main(VertexInput input)
{
	VertexOutput output;

	output.positionHomogeneous = mul(worldMatrix, float4(input.position, 1.0f));
	output.positionWorld = output.positionHomogeneous.xyz;
	output.positionHomogeneous = mul(viewMatrix, output.positionHomogeneous);
	output.positionHomogeneous = mul(projectionMatrix, output.positionHomogeneous);

	output.normalWorld = mul(input.normalLocal.xyz, (float3x3) worldInverseTransposeMatrix);

	//output.textureCoordinate = mul(float4(input.textureCoordinate, 0.0f, 1.0f), textureTransformMatrix).xy;
	output.textureCoordinate = input.textureCoordinate;

	return output;
}